package com.two.common.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;

@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value="餐厅实体类")
public class Restaurant implements Serializable {
    @TableId(value = "rid",type = IdType.AUTO)
    @ApiModelProperty(value = "餐厅id")
    private Integer rid;

    @TableField(value = "restaurantname")
    @ApiModelProperty(value = "餐厅名称")
    private String restaurantName;

    @ApiModelProperty(value = "地址")
    private String address;

    @ApiModelProperty(value = "电话")
    private String phone;

    @ApiModelProperty(value = "介绍")
    private String remark;

    @ApiModelProperty(value = "图片地址")
    private String url;

    @TableLogic //逻辑列
    @TableField(fill = FieldFill.INSERT,value = "is_deleted")
    @ApiModelProperty(value = "是否存在")
    private Integer isDeleted;

    @TableField(fill = FieldFill.INSERT,value = "gmt_created")
    @ApiModelProperty(value = "创建时间")
    private LocalDateTime gmtCreated;

    @TableField(fill = FieldFill.UPDATE,value = "gmt_updated")
    @ApiModelProperty(value = "修改时间")
    private LocalDateTime gmtUpdated;

}
